use "'your directory'\Council.dta"

**Descriptives
tab IT
tab dcomIT 
tab abs_IT 
tab no_IT
tab oppIT
tab posIT4

*** Institutional
logit oppIT caretaker postelection it_semester oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
logit dcomIT caretaker postelection it_semester oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
ologit posIT4 caretaker it_semester oppmeanwithoutIT i.EUformula i.rule, cluster(gov)

*** Political
logit oppIT LR_CH EU_CH RangeLR_CH RangeEU_CH oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
logit dcomIT LR_CH EU_CH RangeLR_CH RangeEU_CH oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
ologit posIT4 LR_CH EU_CH RangeLR_CH RangeEU_CH oppmeanwithoutIT i.EUformula i.rule, cluster(gov) 

*** Institutional + Political
logit oppIT postelection it_semester LR_CH EU_CH RangeLR_CH RangeEU_CH oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
logit dcomIT postelection it_semester LR_CH EU_CH RangeLR_CH RangeEU_CH oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
ologit posIT4 caretaker it_semester LR_CH EU_CH RangeLR_CH RangeEU_CH oppmeanwithoutIT i.EUformula i.rule, cluster(gov)

*Tests for proportionality
omodel logit posIT4 caretaker it_semester oppmeanwithoutIT EUformula rule
omodel logit posIT4 LR_CH EU_CH RangeLR_CH RangeEU_CH oppmeanwithoutIT EUformula rule
omodel logit posIT4 caretaker it_semester LR_CH EU_CH RangeLR_CH RangeEU_CH oppmeanwithoutIT EUformula rule


***Appendix

*Tab. A.1
*LR and EU separately
ologit posIT4 it_semester LR_CH RangeLR_CH oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
ologit posIT4 it_semester EU_CH  RangeEU_CH oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
*Geography
ologit posIT4 it_semester LR_CH EU_CH RangeLR_CH RangeEU_CH i.EUformula i.rule oppSOUTH oppWEST oppNORTH oppEAST, cluster(gov)

*Tab. A.2
*PosIT3
ologit posIT3 postelection it_semester LR_CH EU_CH RangeLR_CH RangeEU_CH oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
*Party manifestos
ologit posIT4 it_semester RILE_PM EU_PM RangeRILE_PM RangeEU_PM oppmeanwithoutIT i.EUformula i.rule, cluster(gov)
ologit posIT4 it_semester RILE_PM EU_PM RangeRILE_PM RangeEU_PM i.EUformula i.rule oppSOUTH oppWEST oppNORTH oppEAST, cluster(gov)


use "C:\Users\marco\Dropbox\a EU Council\Stata\Councilvotenomissing.dta" 
cluster ward v1-v4282 if EU15==1
cluster dendrogram, labels(ctry) ylabel(, angle(0) labsize(small)) horizontal xtitle("Dissimilarity") xlabel(, labsize(small)) graphregion(fcolor(white)) title(Vote, size(medium))

use "'your directory'\Councilopposenomissing.dta" 
cluster ward v1-v4282 if EU15==1
cluster dendrogram, labels(ctry) ylabel(, angle(0) labsize(small)) horizontal xtitle("Dissimilarity") xlabel(, labsize(small)) graphregion(fcolor(white)) title(Opposition, size(medium))

use "'your directory'\Councilstatementsnomissing.dta" 
cluster ward v1-v4282 if EU15==1
cluster dendrogram, labels(ctry) ylabel(, angle(0) labsize(small)) horizontal xtitle("Dissimilarity") xlabel(, labsize(small)) graphregion(fcolor(white)) title(Statements, size(medium))

***For some descriptive statistics and graphs

*Italian pct on tot oppositions and statements
use "'your directory'\Council sum.dta", replace
sum ITpctopp ITpctcom
tabstat ITpctopp ITpctcom, statistics( mean ) by(year)

twoway (line ITpctopp year, lcolor(red)) (line ITpctcom year, lcolor(midblue) lpattern(dash)), ytitle(Pct on total opposition/statements) ytitle(, size(medsmall)) ylabel(, labsize(small)) xtitle(, color(none)) xlabel(, labsize(small)) title(Italy, size(medium)) legend(order(1 "Opposition" 2 "Statements") size(medsmall) region(lcolor(none))) graphregion(fcolor(white))

*Italian and country pct on total acts
use "'your directory'\Council mean.dta", replace
sum pctITopp pctopp pctITcom pctcom

twoway (line pctITopp year, lcolor(red)) (line pctITcom year, lcolor(midblue) lpattern(dash)), ytitle(Pct on total acts) ytitle(, size(medsmall)) ylabel(, labsize(small)) xtitle(, color(none)) xlabel(, labsize(small)) title(Italy, size(medium)) legend(order(1 "Opposition" 2 "Statements") size(medsmall) region(lcolor(none))) graphregion(fcolor(white))

twoway (line pctopp year, lcolor(red)) (line pctcom year, lcolor(midblue) lpattern(dash)), ytitle(Pct on total acts) ytitle(, size(medsmall)) ylabel(, labsize(small)) xtitle(, color(none)) xlabel(, labsize(small)) title(At least one country, size(medium)) legend(order(1 "Opposition" 2 "Statements") size(medsmall) region(lcolor(none))) graphregion(fcolor(white))

*Trends in outcome
use "'your directory'\Council outcome.dta", replace

twoway (line pctagainst year, lcolor(red)) (line pctabstain year, lcolor(blue)) (line pctunanimous year, lcolor(midgreen)), ytitle(Pct on total acts) ytitle(, size(medsmall)) ylabel(, labsize(small)) xtitle(, color(none)) xlabel(, labsize(small)) title(Outcome, size(medium)) legend(cols(3) order(1 "Contrary votes" 2 "Max abstentions" 3 "Unanimously") size(medsmall) region(lcolor(none))) graphregion(fcolor(white))